<#include "../header.ftl">
<link href="${TEMPLATE_PATH}/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_reg.css" rel="stylesheet" type="text/css" />

<script>
function showErrors(id,errors){
	for(var name in errors){
		$.fn.tips({type:"error",content:errors[name]});
		var ele=$("input[name='"+name+"']");
		id.validator('showMsg', ele, {
		    type: "error",
		    msg: errors[name]
		});
	}
}
$(function(){
	$(".form_reg").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"/user/processCash.json",
				type:"post",
				dataType:"json",
				data:$(form).serialize(),
				success:function(data){
					var type="warn";
					if(data.result==true){type="ok";}
					if(data.result==true)
					{
						$.fn.tips({type:type,content:data.msg});
						window.location.reload();
					}else{
						showErrors($('.form_reg'),data.errors);
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
				}
			});
		}
	});
	$("#user_menu_02").addClass("hover");
});
</script>
 <div id="position">您所在的位置：<a href="/">首页</a> > <a href="/user/">会员中心</a></div>
  <div class="w980 mt10 mc">
        <#include "userLeft.ftl">
         <div class="right_big">
            <div class="b">
                <div class="subject">充值提现处理</div>
                <div class="p35"> 
                	<#if cashEntity??>
                	<form class="form_reg" method="post">
                	 <ul id="reg">
                	 	<input type="hidden" name="id" value="<#if cashEntity.id??>${cashEntity.id?c}</#if>">
                		<li><em>类型：</em><#if cashEntity.cashType==1>充值</#if>
                				<#if cashEntity.cashType==2>提现</#if>
                				<#if cashEntity.cashType==3>兑换</#if>
                		</li>
                		<li><em>
                			金额：</em><#if cashEntity.cashCount??>${cashEntity.cashCount}</#if>
                		</li>
                		<li><em>
                			日期：</em><#if cashEntity.createDate??>${cashEntity.createDate?string("yyyy-MM-dd")}</#if>
                		</li>
                		<li><em>
                			提示：</em><#if cashEntity.cashMsg??>${cashEntity.cashMsg}</#if>
                		</li>
                		<li><em>审核备注：</em><input type="text" name="passMsg" class="ip w01" 
                			value="<#if cashEntity.passMsg??>${cashEntity.passMsg}</#if>" data-rule="审核备注:required;" /></li>
                		<#if (cashEntity.status==0)>
                			<dd><input type="submit" value="确认审核" class="bnt_blue" /></dd>
                		<#else>
                			<dd><input type="button" value="返回" onclick="location.href='javascript:history.go(-1)'" class="bnt_blue" /></dd>
                		</#if>
               		 </ul>
                	 </form>	
                	</#if>
                </div>
        	</div>
     	</div>
  </div>
</div>
    
<#include "../footer.ftl">